3.6.49 \(\int \frac {x^{-1+4 n}}{a+b x^n+c x^{2 n}} \, dx\) [549]

Optimal. Leaf size=111 \[ -\frac {b x^n}{c^2 n}+\frac {x^{2 n}}{2 c n}+\frac {b \left (b^2-3 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{c^3 \sqrt {b^2-4 a c} n}+\frac {\left (b^2-a c\right ) \log \left (a+b x^n+c x^{2 n}\right )}{2 c^3 n} \]

[Out]

-b*x^n/c^2/n+1/2*x^(2*n)/c/n+1/2*(-a*c+b^2)*ln(a+b*x^n+c*x^(2*n))/c^3/n+b*(-3*a*c+b^2)*arctanh((b+2*c*x^n)/(-4
*a*c+b^2)^(1/2))/c^3/n/(-4*a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1371, 715, 648, 632, 212, 642} \begin {gather*} \frac {b \left (b^2-3 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{c^3 n \sqrt {b^2-4 a c}}+\frac {\left (b^2-a c\right ) \log \left (a+b x^n+c x^{2 n}\right )}{2 c^3 n}-\frac {b x^n}{c^2 n}+\frac {x^{2 n}}{2 c n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 + 4*n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

-((b*x^n)/(c^2*n)) + x^(2*n)/(2*c*n) + (b*(b^2 - 3*a*c)*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(c^3*Sqrt[b^
2 - 4*a*c]*n) + ((b^2 - a*c)*Log[a + b*x^n + c*x^(2*n)])/(2*c^3*n)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 715

Int[((d_.) + (e_.)*(x_))^(m_)/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)
^m, a + b*x + c*x^2, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2,
0] && NeQ[2*c*d - b*e, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 1371

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*x + c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && NeQ[
b^2 - 4*a*c, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \frac {x^{-1+4 n}}{a+b x^n+c x^{2 n}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^3}{a+b x+c x^2} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {b}{c^2}+\frac {x}{c}+\frac {a b+\left (b^2-a c\right ) x}{c^2 \left (a+b x+c x^2\right )}\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {b x^n}{c^2 n}+\frac {x^{2 n}}{2 c n}+\frac {\text {Subst}\left (\int \frac {a b+\left (b^2-a c\right ) x}{a+b x+c x^2} \, dx,x,x^n\right )}{c^2 n}\\ &=-\frac {b x^n}{c^2 n}+\frac {x^{2 n}}{2 c n}-\frac {\left (b \left (b^2-3 a c\right )\right ) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^n\right )}{2 c^3 n}+\frac {\left (b^2-a c\right ) \text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^n\right )}{2 c^3 n}\\ &=-\frac {b x^n}{c^2 n}+\frac {x^{2 n}}{2 c n}+\frac {\left (b^2-a c\right ) \log \left (a+b x^n+c x^{2 n}\right )}{2 c^3 n}+\frac {\left (b \left (b^2-3 a c\right )\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^n\right )}{c^3 n}\\ &=-\frac {b x^n}{c^2 n}+\frac {x^{2 n}}{2 c n}+\frac {b \left (b^2-3 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{c^3 \sqrt {b^2-4 a c} n}+\frac {\left (b^2-a c\right ) \log \left (a+b x^n+c x^{2 n}\right )}{2 c^3 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.22, size = 97, normalized size = 0.87 \begin {gather*} \frac {c x^n \left (-2 b+c x^n\right )-\frac {2 b \left (b^2-3 a c\right ) \tan ^{-1}\left (\frac {b+2 c x^n}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+\left (b^2-a c\right ) \log \left (a+x^n \left (b+c x^n\right )\right )}{2 c^3 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + 4*n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(c*x^n*(-2*b + c*x^n) - (2*b*(b^2 - 3*a*c)*ArcTan[(b + 2*c*x^n)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] + (b^2
 - a*c)*Log[a + x^n*(b + c*x^n)])/(2*c^3*n)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(972\) vs. \(2(103)=206\).
time = 0.11, size = 973, normalized size = 8.77

method result size
risch \(-\frac {\ln \left (x \right ) a}{c^{2}}+\frac {\ln \left (x \right ) b^{2}}{c^{3}}+\frac {x^{2 n}}{2 c n}-\frac {b \,x^{n}}{c^{2} n}+\frac {4 n^{2} \ln \left (x \right ) a^{2} c^{2}}{4 a \,c^{4} n^{2}-b^{2} c^{3} n^{2}}-\frac {5 n^{2} \ln \left (x \right ) a \,b^{2} c}{4 a \,c^{4} n^{2}-b^{2} c^{3} n^{2}}+\frac {n^{2} \ln \left (x \right ) b^{4}}{4 a \,c^{4} n^{2}-b^{2} c^{3} n^{2}}-\frac {2 \ln \left (x^{n}+\frac {3 a \,b^{2} c -b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) a^{2}}{c \left (4 a c -b^{2}\right ) n}+\frac {5 \ln \left (x^{n}+\frac {3 a \,b^{2} c -b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) a \,b^{2}}{2 c^{2} \left (4 a c -b^{2}\right ) n}-\frac {\ln \left (x^{n}+\frac {3 a \,b^{2} c -b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) b^{4}}{2 c^{3} \left (4 a c -b^{2}\right ) n}+\frac {\ln \left (x^{n}+\frac {3 a \,b^{2} c -b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) \sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c^{3} \left (4 a c -b^{2}\right ) n}-\frac {2 \ln \left (x^{n}-\frac {-3 a \,b^{2} c +b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) a^{2}}{c \left (4 a c -b^{2}\right ) n}+\frac {5 \ln \left (x^{n}-\frac {-3 a \,b^{2} c +b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) a \,b^{2}}{2 c^{2} \left (4 a c -b^{2}\right ) n}-\frac {\ln \left (x^{n}-\frac {-3 a \,b^{2} c +b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) b^{4}}{2 c^{3} \left (4 a c -b^{2}\right ) n}-\frac {\ln \left (x^{n}-\frac {-3 a \,b^{2} c +b^{4}+\sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c b \left (3 a c -b^{2}\right )}\right ) \sqrt {-36 a^{3} b^{2} c^{3}+33 a^{2} b^{4} c^{2}-10 a \,b^{6} c +b^{8}}}{2 c^{3} \left (4 a c -b^{2}\right ) n}\) \(973\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+4*n)/(a+b*x^n+c*x^(2*n)),x,method=_RETURNVERBOSE)

[Out]

-1/c^2*ln(x)*a+1/c^3*ln(x)*b^2+1/2/c/n*(x^n)^2-b*x^n/c^2/n+4/(4*a*c^4*n^2-b^2*c^3*n^2)*n^2*ln(x)*a^2*c^2-5/(4*
a*c^4*n^2-b^2*c^3*n^2)*n^2*ln(x)*a*b^2*c+1/(4*a*c^4*n^2-b^2*c^3*n^2)*n^2*ln(x)*b^4-2/c/(4*a*c-b^2)/n*ln(x^n+1/
2*(3*a*b^2*c-b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2))/c/b/(3*a*c-b^2))*a^2+5/2/c^2/(4*a*c-b^
2)/n*ln(x^n+1/2*(3*a*b^2*c-b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2))/c/b/(3*a*c-b^2))*a*b^2-1
/2/c^3/(4*a*c-b^2)/n*ln(x^n+1/2*(3*a*b^2*c-b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2))/c/b/(3*a
*c-b^2))*b^4+1/2/c^3/(4*a*c-b^2)/n*ln(x^n+1/2*(3*a*b^2*c-b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(
1/2))/c/b/(3*a*c-b^2))*(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2)-2/c/(4*a*c-b^2)/n*ln(x^n-1/2*(-3*
a*b^2*c+b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2))/c/b/(3*a*c-b^2))*a^2+5/2/c^2/(4*a*c-b^2)/n*
ln(x^n-1/2*(-3*a*b^2*c+b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2))/c/b/(3*a*c-b^2))*a*b^2-1/2/c
^3/(4*a*c-b^2)/n*ln(x^n-1/2*(-3*a*b^2*c+b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2))/c/b/(3*a*c-
b^2))*b^4-1/2/c^3/(4*a*c-b^2)/n*ln(x^n-1/2*(-3*a*b^2*c+b^4+(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/
2))/c/b/(3*a*c-b^2))*(-36*a^3*b^2*c^3+33*a^2*b^4*c^2-10*a*b^6*c+b^8)^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+4*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

(b^2 - a*c)*log(x)/c^3 + 1/2*(c*x^(2*n) - 2*b*x^n)/(c^2*n) + integrate(-(a*b^2 - a^2*c + (b^3 - 2*a*b*c)*x^n)/
(c^4*x*x^(2*n) + b*c^3*x*x^n + a*c^3*x), x)

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 353, normalized size = 3.18 \begin {gather*} \left [-\frac {{\left (b^{3} - 3 \, a b c\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2 \, n} + b^{2} - 2 \, a c + 2 \, {\left (b c - \sqrt {b^{2} - 4 \, a c} c\right )} x^{n} - \sqrt {b^{2} - 4 \, a c} b}{c x^{2 \, n} + b x^{n} + a}\right ) - {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} x^{2 \, n} + 2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} x^{n} - {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} n}, \frac {2 \, {\left (b^{3} - 3 \, a b c\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {2 \, \sqrt {-b^{2} + 4 \, a c} c x^{n} + \sqrt {-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right ) + {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} x^{2 \, n} - 2 \, {\left (b^{3} c - 4 \, a b c^{2}\right )} x^{n} + {\left (b^{4} - 5 \, a b^{2} c + 4 \, a^{2} c^{2}\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} n}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+4*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

[-1/2*((b^3 - 3*a*b*c)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^(2*n) + b^2 - 2*a*c + 2*(b*c - sqrt(b^2 - 4*a*c)*c)*x^n
- sqrt(b^2 - 4*a*c)*b)/(c*x^(2*n) + b*x^n + a)) - (b^2*c^2 - 4*a*c^3)*x^(2*n) + 2*(b^3*c - 4*a*b*c^2)*x^n - (b
^4 - 5*a*b^2*c + 4*a^2*c^2)*log(c*x^(2*n) + b*x^n + a))/((b^2*c^3 - 4*a*c^4)*n), 1/2*(2*(b^3 - 3*a*b*c)*sqrt(-
b^2 + 4*a*c)*arctan(-(2*sqrt(-b^2 + 4*a*c)*c*x^n + sqrt(-b^2 + 4*a*c)*b)/(b^2 - 4*a*c)) + (b^2*c^2 - 4*a*c^3)*
x^(2*n) - 2*(b^3*c - 4*a*b*c^2)*x^n + (b^4 - 5*a*b^2*c + 4*a^2*c^2)*log(c*x^(2*n) + b*x^n + a))/((b^2*c^3 - 4*
a*c^4)*n)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+4*n)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+4*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate(x^(4*n - 1)/(c*x^(2*n) + b*x^n + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^{4\,n-1}}{a+b\,x^n+c\,x^{2\,n}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(4*n - 1)/(a + b*x^n + c*x^(2*n)),x)

[Out]

int(x^(4*n - 1)/(a + b*x^n + c*x^(2*n)), x)

________________________________________________________________________________________